import { reqAddress, reqOrderInfo } from "@/api"

const actions = {
    async getTradeInfo(context) {
        let result = await reqAddress()
    },
    async getOrderInfo(context) {
        let result = await reqOrderInfo()
        if (result.code === 200) {
            context.commit('GETORDERINFO', result.data)
        }
    },

}

const mutations = {
    GETORDERINFO(state, orderInfo) {
        state.orderInfo = orderInfo
    }

}

const state = {
    orderInfo: [

    ]

}

const getters = {

}

export default {
    actions,
    mutations,
    state,
    getters
}